Weave on self-managed infrastructure is currently in Private Preview.For production environments, W&B strongly recommends using W&B Dedicated Cloud, where Weave is Generally Available.To deploy a production-grade, self-managed instance, contact support@wandb.com.
This guide explains how to deploy all the components required to run W&B Weave in a self-managed environment.
A key component of a self-managed Weave deployment is ClickHouseDB, which the Weave application backend relies on.
Although the deployment process sets up a fully functional ClickHouseDB instance, you may need to take additional steps to ensure reliability and high availability for a production-ready environment.
Requirements
- W&B Platform installed. For more information, see the Self-Managed Deployment Guide.
- Bitnami’s ClickHouse Helm Chart.
- An S3 bucket pre-configured for ClickHouse storage. For configuration details, see Provide S3 Credentials.
- Kubernetes Cluster Nodes with the following specifications:
- CPU: 8 cores
- RAM: 64 GB
- Disk: 200GB+
- A Weave-enabled license from W&B. To request a license, please contact
support@wandb.com.
The ClickHouse deployment in this document uses the Bitnami ClickHouse package.
The Bitnami Helm chart provides good support for basic ClickHouse functionalities, particularly the use of ClickHouse Keeper.
To configure Clickhouse, complete the following steps:
- Configure the Helm repository
- Create Helm Configuration
- Provide S3 credentials
-
Add the Bitnami Helm repository:
helm repo add bitnami https://charts.bitnami.com/bitnami
-
Update the repository:
helm repo update
Create Helm Configuration
The most critical part of the Helm configuration is the ClickHouse configuration, which is provided in XML format. Below is an example values.yaml file with customizable parameters to suit your needs.
To make the configuration process easier, we have added comments in the relevant sections using the format {/* COMMENT */}.
Modify the following parameters:
clusterName
auth.username
auth.password
- S3 bucket-related configurations
W&B recommends keeping the clusterName value in values.yaml set to weave_cluster. This is the expected cluster name when W&B Weave runs the database migration. If you need to use a different name, see the Setting clusterName section for more information.
S3 endpoint configuration
The bucket endpoint must be set as an environment variable to ensure each ClickHouse replica read and writes data in it’s folder in the bucket.
Do not remove the $(CLICKHOUSE_REPLICA_ID) from the bucket endpoint configuration. It will ensure each ClickHouse replica is writing and reading data from it’s folder in the bucket.
Provide S3 credentials
You can specify credentials for accessing an S3 bucket by either hardcoding the configuration, or having ClickHouse fetch the data from environment variables or an EC2 instance.
Hardcode the configuration
Directly include the credentials in the storage configuration:
Instead of hardcoding credentials, you can enable ClickHouse to fetch them dynamically from environment variables or Amazon EC2 instance metadata.
You can find more details on this at ClickHouse: Separation of Storage and Compute.
2. Install and deploy ClickHouse
With the repositories set up and the values.yaml file prepared, the next step is to install ClickHouse.
Ensure you’re using the version 8.0.10. The latest chart version (9.0.0) doesn’t work with the configuration proposed in this document.
3. Confirm ClickHouse deployment
Confirm that ClickHouse is deployed using the following command:
You should see the following pods:
4. Deploy Weave
Weave is already available for automatic deployment via W&B Operator. With the W&B Platform installed, complete the following steps:
- Edit the CR instance used to deploy the platform.
- Add the Weave configuration.
- Use Kubernetes service details to configure Weave tracing:
- Endpoint:
<release-name>-headless.<namespace>.svc.cluster.local
- Replace
<release-name> with your Helm release name
- Replace
<namespace> with your NAMESPACE
- Get the service details:
kubectl get svc -n <namespace>
- Username: Set in the
values.yaml
- Password: Set in the
values.yaml
-
With this information, update the W&B Platform Custom Resource(CR) by adding the following configuration:
When using more than one replica (W&B recommend a least 3 replicas), ensure to have the following environment variable set for Weave Traces.This has the same effect of replicated: true which in preview.
-
Set the
clusterName in values.yaml to weave_cluster. If it is not, the database migration will fail.
Alternatively, ff you use a different cluster name, set the WF_CLICKHOUSE_REPLICATED_CLUSTER environment variable in weave-trace.extraEnv to match the chosen name, as shown in the example below.
The final configuration will look like the following example:
-
With the Custom Resource (CR) prepared, apply the new configuration:
6. Access Weave
Once the deployment is running, accessing the W&B endpoint configured in the host option should display the Weave licensing status as enabled.
